<?php
preg_match_all("/detailes?_([0-9]+)\.html/Uisx",$this->url,$nn);
$url='http://www.hatuwang.com/ajaxs.aspx?action=picList&pType=2&id='.$nn[1][0];  
$pagehtml= curl_file_get_contents3($this->url);  
if($pagehtml==""){
$url='http://www.hatuwang.com/ajaxs.aspx?action=picList&pType=1&id='.$nn[1][0];  
$pagehtml= curl_file_get_contents3($this->url);  			
}
if($pagehtml==""){
$url='http://www.hatuwang.com/ajaxs.aspx?action=picList&pType=3&id='.$nn[1][0];  
$pagehtml= curl_file_get_contents3($this->url);  			
}
$pagehtml = preg_replace("/　/",'',$pagehtml);   
$pagehtml=iconv("GB2312","UTF-8//IGNORE",$pagehtml);

preg_match_all("/\"picurl\"\:\"([^<>]*\.jpg)\"/Uisx",$pagehtml, $matches3);
$urls=array();
for($i=1;$i<count($matches3[1]);$i++){
   $urls[]="[img]http://www.hatuwang.com/Files/upload_img/".$matches3[1][$i]."[/img]\r\n";
}

preg_match_all("/\"context\"\:\"([^<>]*)(?<!\\\)\"/Uisx",$pagehtml, $matches3);
for($i=0;$i<count($matches3[1]);$i++){
   $textarea.=$urls[$i].$matches3[1][$i]."\r\n";
}
?>